#include "enemy.h"

Enemy::Enemy()
{
	//ctor
}

Enemy::~Enemy()
{
	//dtor
}


i32 Enemy::Render()
{

    static double ang = 45;
    ang += 3;
    if (ang > 360)
        ang = 0;

    angle = calcAngle(ang);

	SDL_Rect dst;
	dst.x = px;
	dst.y = py;
	visual.frames[current_frame].surface[angle]->format->Amask = 0xFF000000;
	SDL_SetAlpha (  visual.frames[current_frame].surface[angle], SDL_SRCALPHA | SDL_SRCCOLORKEY, 0xFF );
	dst.x -= ( visual.frames[current_frame].surface[angle]->w - visual.w ) / 2;
	dst.y -= ( visual.frames[current_frame].surface[angle]->h - visual.h ) / 2;
	SDL_BlitSurface ( visual.frames[current_frame].surface[angle], NULL, g_screen, &dst );
	return 1;
}





